package com.zzyy.study.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzyy.study.entities.Product;
import com.zzyy.study.service.ProductService;
import com.zzyy.study.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 阳
* @description 针对表【t_product】的数据库操作Service实现
* @createDate 2024-06-28 15:19:17
*/
@Service
//@DS("slave_1") //用于多数据源演示，后续讲解多租户请注释
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService
{

    @Resource
    private ProductMapper productMapper;

    public List<Product> findAll() {
        return productMapper.selectList(null);
    }

}




